import Vue from 'vue'
import VueRouter from 'vue-router'
const Home =() => import(/* webpackChunkName:"Home" */ '../views/tabbar/home.vue') 
// import Home from '../views/tabbar/home.vue'
const Search =() => import(/* webpackChunkName:"Home" */ '../views/tabbar/search.vue') 
const Contact =() => import(/* webpackChunkName:"Home" */ '../views/home/contact.vue') 
const NewsList =() => import(/* webpackChunkName:"Home" */ '../views/home/newslist.vue') 
const Person =() => import(/* webpackChunkName:"Home" */ '../views/tabbar/person.vue') 
const Detail =() => import(/* webpackChunkName:"Home" */ '../views/news/detail.vue') 
const List =() => import(/* webpackChunkName:"photo" */ '../views/photo/list.vue') 
const ListDetail =() => import(/* webpackChunkName:"photo" */ '../views/photo/detail.vue') 
const AddGoods =() => import(/* webpackChunkName:"goods" */ '../views/goods/addgoods.vue') 
const goodsList =() => import(/* webpackChunkName:"goods" */ '../views/goods/goodsList') 
const goodsDetail =() => import(/* webpackChunkName:"goods" */ '../views/goods/goodsDetail') 
const goodsdesc =() => import(/* webpackChunkName:"goods" */ '../views/goods/goodsdesc.vue') 
const goodscomments =() => import(/* webpackChunkName:"goods" */ '../views/goods/goodscomments.vue') 
const shoppcart =() => import(/* webpackChunkName:"goods" */ '../views/goods/shoppcart.vue') 

// import Search from '../views/tabbar/search.vue'
// import List from '../views/photo/list.vue'
// import ListDetail from '../views/photo/detail.vue'
// import AddGoods from '../views/goods/addgoods.vue'
// import Contact from '../views/home/contact.vue'
// import Person from '../views/tabbar/person.vue'
// import NewsList from '../views/home/newslist.vue'
// import Detail from '../views/news/detail.vue'
// import goodsList from '../views/goods/goodsList'
// import goodsDetail from '../views/goods/goodsDetail'
// import goodsdesc from '../views/goods/goodsdesc.vue'
// import goodscomments from '../views/goods/goodscomments.vue'
// import shoppcart from '../views/goods/shoppcart.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/',redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/search', component: Search },
  { path: '/photo/list', component: List },
  { path: '/photo/list/:id', component: ListDetail },
  { path: '/addgoods', component: AddGoods },
  { path: '/contact', component: Contact },
  { path: '/newslist', component: NewsList },
  { path: '/news/detail/:id', component: Detail },
  { path: '/person', component: Person },
  { path: '/goods/list', component: goodsList },
  { path: '/goods/detail/:id', component: goodsDetail },
  { path: '/goodsdesc/:id', component: goodsdesc },
  { path: '/goodscomments/:id', component: goodscomments },
  { path: '/shoppcart', component: shoppcart }
]

const router = new VueRouter({
  routes
})

export default router
